package com.atguigu.boot.controller;

import com.atguigu.boot.entity.Person;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * @ClassName PersonController
 * @Description 此类描述:
 * @Author dangchen
 * @DateTime 2022-09-13 20:01
 * @Version 1.0
 */
@RestController
@Slf4j
public class PersonController {
    @Value("${server.port}")
    private String port;

    @Autowired
    private Person person;

    @GetMapping(value = "/init")
    public Person initPersonInfo()
    {
        log.info("---personinfo:{},port:{}",person,port);
        return person;
    }


}
